Skip to content

Conversation

eleanorjboyd
Copy link
Owner

No description provided.

if (fileUri !== undefined) {
// filter out arg "." if it exits
const filteredPytestArgs = pytestArgs.filter((arg) => arg !== '.');
filteredPytestArgs.push(fileUri.fsPath);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting it together. I believe you also need to push "-k" at the beginning unless I misunderstood how this part works. But I think this only affects running tests, i.e. after collecting, so it probably doesn't affect performance.
I have also seen that there are other options:

  --ignore=path         ignore path during collection (multi-allowed).
  --ignore-glob=path 
  --override-ini python_files (args):  glob-style file patterns for Python test module discovery

Maybe python_files is the one to use, but I also dont know if it will work since it may not support full file paths. 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants